package com.eshop.message.redis.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
@ConfigurationProperties(prefix = "spring.redis")
public class RedisConfigProperties
{
    private String host;
    private String port;
    private String password;
    private String database;
    
    public RedisConfigProperties() {
        this.host = "host";
        this.port = "port";
        this.password = "password";
        this.database = "database";
    }
    
    public String getHost() {
        return this.host;
    }
    
    public String getPort() {
        return this.port;
    }
    
    public String getPassword() {
        return this.password;
    }
    
    public String getDatabase() {
        return this.database;
    }
    
    public void setHost(final String host) {
        this.host = host;
    }
    
    public void setPort(final String port) {
        this.port = port;
    }
    
    public void setPassword(final String password) {
        this.password = password;
    }
    
    public void setDatabase(final String database) {
        this.database = database;
    }
    
    @Override
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof RedisConfigProperties)) {
            return false;
        }
        final RedisConfigProperties other = (RedisConfigProperties)o;
        if (!other.canEqual(this)) {
            return false;
        }
        final Object this$host = this.getHost();
        final Object other$host = other.getHost();
        Label_0065: {
            if (this$host == null) {
                if (other$host == null) {
                    break Label_0065;
                }
            }
            else if (this$host.equals(other$host)) {
                break Label_0065;
            }
            return false;
        }
        final Object this$port = this.getPort();
        final Object other$port = other.getPort();
        Label_0102: {
            if (this$port == null) {
                if (other$port == null) {
                    break Label_0102;
                }
            }
            else if (this$port.equals(other$port)) {
                break Label_0102;
            }
            return false;
        }
        final Object this$password = this.getPassword();
        final Object other$password = other.getPassword();
        Label_0139: {
            if (this$password == null) {
                if (other$password == null) {
                    break Label_0139;
                }
            }
            else if (this$password.equals(other$password)) {
                break Label_0139;
            }
            return false;
        }
        final Object this$database = this.getDatabase();
        final Object other$database = other.getDatabase();
        if (this$database == null) {
            if (other$database == null) {
                return true;
            }
        }
        else if (this$database.equals(other$database)) {
            return true;
        }
        return false;
    }
    
    protected boolean canEqual(final Object other) {
        return other instanceof RedisConfigProperties;
    }
    
    @Override
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $host = this.getHost();
        result = result * 59 + (($host == null) ? 43 : $host.hashCode());
        final Object $port = this.getPort();
        result = result * 59 + (($port == null) ? 43 : $port.hashCode());
        final Object $password = this.getPassword();
        result = result * 59 + (($password == null) ? 43 : $password.hashCode());
        final Object $database = this.getDatabase();
        result = result * 59 + (($database == null) ? 43 : $database.hashCode());
        return result;
    }
    
    @Override
    public String toString() {
        return "RedisConfigProperties(host=" + this.getHost() + ", port=" + this.getPort() + ", password=" + this.getPassword() + ", database=" + this.getDatabase() + ")";
    }
}
